package com.ruoyi.walmart.service.address.impl;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.walmart.domain.address.Address;
import com.ruoyi.walmart.mapper.address.AddressMapper;
import com.ruoyi.walmart.service.address.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressServiceImpl implements AddressService {

    @Autowired
    AddressMapper addressMapper;


    @Override
    public int insertAll(Address address) {
        address.setCreateTime(DateUtils.getNowDate());
        return addressMapper.insertAll(address);
    }

    @Override
    public List<Address> selectAll(Address address) {
        return addressMapper.selectAll(address);
    }

    @Override
    public int updateShipmentAddress(Address address) {
        address.setUpdateTime(DateUtils.getNowDate());
        return addressMapper.updateShipmentAddress(address);
    }
}
